package com.example.dormitorymanagement;

import com.example.dormitorymanagement.service.BuildingService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.context.annotation.Bean;

@EnableScheduling
@SpringBootApplication(scanBasePackages = "com.example.dormitorymanagement")
public class DormitoryManagementApplication {
    public static void main(String[] args) {
        SpringApplication.run(DormitoryManagementApplication.class, args);
    }

    @Bean
    CommandLineRunner checkBeans(BuildingService buildingService) {
        return args -> System.out.println("BuildingService Bean: " + buildingService.getClass());
    }
}
